home *** CD-ROM | disk | FTP | other *** search
- Path: vixen.cso.uiuc.edu!usenet
- From: Dragos-Anton Manolescu <manolesc@uiuc.edu>
- Newsgroups: comp.lang.c++
- Subject: Q: static private variables/functions
- Date: 01 Apr 1996 17:01:49 -0600
- Organization: University of Illinois at Urbana-Champaign
- Message-ID: <op3f6ntuoy.fsf@sweetbay.will.uiuc.edu>
- Reply-To: Dragos Manolescu <manolesc@uiuc.edu>
- NNTP-Posting-Host: sweetbay.will.uiuc.edu
- X-Newsreader: Gnus v5.1
-
-
- Hello,
-
- I'm trying to use a class with several static private variables and
- functions. Here's a piece from my code (have left just one variable
- and one function to keep the code clear):
-
- class Movie {
- private:
- // Jpeg playback class variables
- static XtAppContext appContext;
- // Private functions
- static void PrivateXtLoop(void);
- [stuff deleted]
- };
-
- Everything compiles Ok but apparently the linker is not able to find
- the class variables:
-
- /bin/ld: Unsatisfied symbols:
- Movie::appContext (data)
- *** Error code 1
- `all' not remade because of errors
-
- All the class variables are private, and therefore used just by
- the member functions.
-
- What am I doing wrong here? I use g++ 2.7.2 and libg++ 2.7.1.3, if
- that matters.
-
- Please reply by e-mail, if possible.
-
- Thank you in advance!
- --
- dam http://www.uiuc.edu/ph/www/manolesc
-